
package com.doudou.pay.helper;

import com.doudou.pay.helper.service.PayService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * Created by 鹏 on 2015/2/28.
 */
@Component
@EnableScheduling
public class SysEngine {

  private static final Log LOG = LogFactory.getLog(SysEngine.class);

  @Autowired
  private PayService payService;

  @Scheduled(cron = "0 0 1 * * ?")
  public void exe() {
    payService.setAccountsPayMoneyZero();
    System.out.println("time up!!!");
  }
}
